package com.ruoyi.audit.controller;

import com.ruoyi.audit.entity.po.Business;
import com.ruoyi.audit.service.BusinessService;
import com.ruoyi.audit.utils.Result;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/business")
public class BusinessController {
    @Resource
    BusinessService businessService;

    /**
     * 查询待审核的商家
     * @return
     */
    @RequestMapping("/findByBusinessStatus")
    public Result findByBusinessStatus(){
        return businessService.findByBusinessStatus();
    }

    /**
     * 运营商对商家进行审核
     * @param business
     * @return
     */
    @RequestMapping("/checkByBusinessId")
    public Result checkByBusinessId(@RequestBody Business business){
        return businessService.checkByBusinessId(business);
    }

}
